<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

//后台路由文件  app_path表示根目录
require_once app_path('Http\Route').'\admin.php';

Route::get('/', function () {
    return view('welcome');
});

//资源路由
Route::resource('news', 'NewsController');

//隐式路由  自定义登录
Route::controller('udetail','NewsController');


//资源路由
Route::resource('/art','ArticleController');
// Route::controller('/arts','ArticleController');
//隐式路由  自定义登录
Route::controller('/qq','ArticleController');


//登录注册路由
// 认证路由...
Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');
// 注册路由...
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');

//前台资源路由
Route::resource('home/index', 'Home\IndexController');

//定义welcome路由
//Route::get('welcome/welcome','Home\IndexController@welcome');
Route::get('/welcome','Admin\IndexController@welcome');

Route::resource('image','Home\ImageController');